package com.cj.educms.controller;


import com.cj.commonutils.R;
import com.cj.educms.entity.CrmBanner;
import com.cj.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前台banner
 * </p>
 *
 * @author testjava
 * @since 2023-04-10
 */
@RestController
@RequestMapping("/educms/bannerfront")
//@CrossOrigin
public class CrmFrontController {
    @Autowired
    private CrmBannerService bannerService;

    @GetMapping("getAllBanner")
    public R getAllBanner(){
        List<CrmBanner> list =bannerService.selectAllBanner();
        return R.ok().data("list", list);
    }
}

